package com.tidc.seaquartz.controller;

import com.tidc.seaquartz.service.MissionCountDownService;
import com.tidc.seaservermodel.aspect.WebLog;
import com.tidc.seaservermodel.entity.Commitment;
import com.tidc.seaservermodel.entity.Fres;
import com.tidc.seaservermodel.entity.UserTask;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author ：冯涛滔
 * @date ：Created in 2020/10/3 14:53
 * @description：
 * @modified By：
 * @version:
 */
@RestController
@RequestMapping("/quartz")
public class MissionCountdownController {
    @Resource
    private MissionCountDownService missionCountDownService;
    @PostMapping("/addtaskcountdown")
    public Fres<Integer> addTaskCountDown(@RequestBody UserTask userTask){
         return missionCountDownService.addTaskCountDown(userTask);
    }
    @WebLog
    @PostMapping("/check/commitment/out")
    public Fres<Integer> checkCommitmentOut(@RequestBody Commitment commitment){
        return missionCountDownService.checkCommitmentOut(commitment);
    }
}
